package one.stand.dto;

import com.github.pagehelper.Page;
import lombok.Data;

import java.util.List;

/**
 * @author cjr
 */
@Data
public class PageResponse<T> {
    private List<T> result;
    private Integer totalPage;
    private Long count;

    public void setPage(List list) {
        if (list instanceof Page) {
            totalPage = ((Page) list).getPages();
            count = ((Page) list).getTotal();
        }
    }
}
